From: kfraser@localhost.localdomain Date: Wed, 26 Jul 2006 10:10:26 +0000 (+0100) Subject: [SVM] Correct compile time compare of CONFIG_PAGING_LEVELS for 64bit and X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15786^2~10^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=ab488e380243c5a4c17d022d6725b3ef5da601af;p=xen.git [SVM] Correct compile time compare of CONFIG_PAGING_LEVELS for 64bit and 32bit PAE guests. This code affects accesses to the CR4 register by the SVM guest. Signed-off-by: Tom Woller --- diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 0fc10b0715..998611220e 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1766,7 +1766,7 @@ static int mov_to_cr(int gpreg, int cr, struct cpu_user_regs *regs) if ( svm_pgbit_test(v) ) { /* The guest is a 32-bit PAE guest. */ -#if CONFIG_PAGING_LEVELS >= 4 +#if CONFIG_PAGING_LEVELS >= 3 unsigned long mfn, old_base_mfn; if( !shadow_set_guest_paging_levels(v->domain, PAGING_L3) ) @@ -1810,7 +1810,7 @@ static int mov_to_cr(int gpreg, int cr, struct cpu_user_regs *regs) else { /* The guest is a 64 bit or 32-bit PAE guest. */ -#if CONFIG_PAGING_LEVELS >= 4 +#if CONFIG_PAGING_LEVELS >= 3 if ( (v->domain->arch.ops != NULL) && v->domain->arch.ops->guest_paging_levels == PAGING_L2) {